import { createRouter, createWebHistory } from 'vue-router'

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/',
      name: 'home',
      component: ()=>import('@/views/HomeView.vue'),
    },
    {
      path: '/about',
      name: 'about',
      meta:{
        title: 'About'
      },
      component:()=>import('@/views/AboutView.vue')
    },
    {
      path: '/clubs',
      name: 'clubs',
      component:()=>import('@/views/ClubsView.vue')

    },
    {
      path: '/detail/:id',
      name: 'detail',
      component:()=>import('@/views/ClubDetailView.vue')
    },
    {
      path: '/events',
      name: 'events',
      component:()=>import('@/views/EventsView.vue')
    },
    {
      path: '/event/:id',
      name: 'event',
      component:()=>import('@/views/EventDetailView.vue')
    },
    {
      path: '/User',
      name: 'User',
      component:()=>import('@/views/UserView.vue')
    },
    {
      path:'/message'
      ,name:'message'
      ,component:()=>import('@/views/MessageBoardView.vue')
    },
    {
      path: '/404',
      name: '404',
      component:()=>import('@/views/404View.vue')
    },
    {
      path: '/error',
      name: 'error',
      component:()=>import('@/views/ErrorView.vue')
    }
  ],
})

export default router
